#ifndef CUBE_H
#define CUBE_H

#include "D3dUtil.h"

class Cube
{
public:
	Cube();
	~Cube();

	void OnResetDevice();
	void OnLostDevice();
	void Draw(D3DXMATRIX &mView, D3DXMATRIX &mProj);
	void Update(float dt);

private:
	void BuildVertexBuffer();
	void BuildIndexBuffer();

	IDirect3DVertexBuffer9* mVB;
	IDirect3DIndexBuffer9* mIB;

	IDirect3DTexture9* mTex;

	ID3DXEffect* mFX;
	D3DXHANDLE mhWVP;
	D3DXHANDLE mhTex0;
	D3DXHANDLE mhTech;
	ID3DXBuffer* errors;

	// Game Variables
	D3DXVECTOR3 forward;
	D3DXVECTOR3 left;
	float angleY;
	float speed;
};

#endif